Licensing Service
This service can be used to add license information for a TimePunch Profile.
AddLicense
This method adds a TimePunch license to the internal license management.
ApplicationLicenseDto AddLicense(
out TpFault fault,
TpAuthentication authentication,
string applicationKey,
string licensedFor,
string licenseCode);
Needed Permission | core@logon | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
applicationKey | Currently not used! | |
licensedFor | License Name | |
licenseCode | License Code | |
return value | Information about the currently added license |
ExchangeLicense
This method exchanges an existing license for a new license. This can be useful for upgrades, when the old license is no longer needed, but the employees should be assigned one-to-one to the new license.
ApplicationLicenseDto ExchangeLicense(
out TpFault fault,
TpAuthentication authentication,
string[] applicationKeys,
Guid applicationLicenseId,
string licensedFor,
string licenseCode);
Needed Permission | licenses@manage | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
applicationKeys | Specifies the application to add the license | |
applicationLicenseId | Old application license id to remove | |
licensedFor | License Name | |
licenseCode | License Code | |
return value | Information about the currently added license |
GetApplicationLicenses
This method returns the application licenses for the given application keys.
ApplicationLicenseDto[] GetApplicationLicenses(
out TpFault fault,
TpAuthentication authentication,
string[] applicationKeys);
Needed Permission | core@logon | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
applicationKeys | Specifies the application to retrieve license information for. | |
return value | Application specific license information |
GetLicensingState
This method checks the licensing of a single employee. It is also important to specify which licenses you want to search for. This is determined by the ApplicationKeys parameter. The actual licensed application key is returned. Example, a license for TimePunch PRO and PZE Watcher is searched for. If the employee has licensed the PZE Watcher, the application key for the Watcher is returned.
LicensingState GetLicensingState(
out TpFault fault,
TpAuthentication authentication,
string[] applicationKeys,
out int daysLeft,
out string applicationKey);
Needed Permission | core@logon | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
applicationKeys | Specifies the application to retrieve license information for. | |
daysLeft | Out | Defines how many days the license will be valid. |
applicationKey | Out | Gets the application key for that the user owns a specific license. |
return value | Gets the licensing state of the user NoLicense, TestLicenseFound, TestLicenseExpired, LicenseFound, LicenseExpired, Undefined |
IsLicenseUpgradeNeeded
This method checks whether the existing licenses can be updated to a new version of TimePunch. This is of particular interest for version-specific licenses, since these licenses are only valid for a certain version.
bool IsLicenseUpgradeNeeded (
out TpFault fault,
TpAuthentication authentication,
string[] applicationKeys,
string version);
Needed Permission | --- | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
applicationKeys | Specifies the application to retrieve license information for. | |
version | Version that shall be tested. | |
return value | True, if the current license is upgradable. E.g. the current version is 2.95 – the new version will be 3.2 which will than result in true as the return value. |
RequestUpgradeOffer
If the result of the upgrade check is true (IsLicenseUpgradeable), you can use this method to request a quotation for the version upgrade. The method connects to TimePunch and transfers the license data so that an individual upgrade offer can be sent.
RequestOfferResult RequestUpgradeOffer(
out TpFault fault,
TpAuthentication authentication,
string[] applicationKeys,
RequestUpgradeOfferDto requestUpgradeOffer);
Needed Permission | --- | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
applicationKeys | Specifies the application to retrieve license information for. | |
requestUpgradeOffer | Customer data used to send the upgrade offer | |
Return value | Result of the upgrade offer request Error, NoUpgradeNecessary, AutomaticOffer, ManualOffer |
GetUserLicenses
This method returns all license data for the employees specified in the search object. It is important to specify which licenses to search. This is set by the parameter applicationKeys.
ApplicationKeys.UserLicenseDto[] GetUserLicenses(
out TpFault fault,
TpAuthentication authentication,
string[] applicationKeys,
UserSearchDto searchDto);
Needed Permission | core@logon | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
applicationKeys | Specifies the application to retrieve license information for. | |
searchDto | Search object to specify the users for loading the license data. | |
return value | User specific license information |
RemoveLicenses
Using this method already inserted application licenses can be removed again.
void RemoveLicenses(
out TpFault fault,
TpAuthentication authentication,
string[] applicationKeys,
Guid[] applicationLicenseIds);
Needed Permission | licenses@manage | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
applicationKeys | Specifies the application to register the user | |
applicationLicenseIds | List containing the application license ids that shall be removed for the given application keys. |
RegisterUsers
This method attempts to register the specified employee profiles for the application specified in the parameter applicationKeys. This will only work if for the employees still licenses are available.
void RegisterUsers(
out TpFault fault,
TpAuthentication authentication,
string[] applicationKeys,
List<Guid> userIds);
Needed Permission | core@logon | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
applicationKeys | Specifies the application to register the user | |
userIds | List containing the user ids that shall be registered for the given application keys. |
UnregisterUsers
This method removes the license information for an employee. This removes only the licenses for the applications that are specified in the parameter applicationKeys.
void UnregisterUsers(
out TpFault fault,
TpAuthentication authentication,
string[] applicationKeys,
List<Guid> userIds);
Needed Permission | core@logon | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
applicationKeys | Specifies the application to un-register the user | |
userIds | List containing the user ids that shall be un-registered for the given application keys. |